import {getOrderById} from "../api/order"

const state = {
    orderlist:[]
}
const mutations = {
    SET_ORDERLIST(state, payload) {
        state.orderlist = [...payload]
    }
}
const actions = {
    async getOrderAll(store,userid){
        let res = await getOrderById({
            commercialid:userid
        })
        console.log(res.data.data,"res")
        store.commit('SET_ORDERLIST',res.data.data)
    }
}
export default {
    state, mutations, actions
}